﻿<Window x:Class="DTC.Popups.OrderingOptionsPopup"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Converters="clr-namespace:DTC.Converters"
        Title="Настройка системы заказов" Height="350" Width="330"
        Style="{StaticResource PopupWindow}"
        Closing="Window_Closing">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="../Resources/TextBlockStyles.xaml"/>
                <ResourceDictionary Source="../Resources/TextEditStyles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
    <StackPanel Margin="20" Name="MainGrid" VerticalAlignment="Center">
        <TextBlock Text="Периодичность заказов"/>
        <WrapPanel>
            <TextBox Name="OrderPeriodTextBox"
                     Margin="15,5,0,0"
                     Width="150"
                     HorizontalAlignment="Left"
                     Text="{Binding OrderPeriodHours}"/>
            <TextBlock Text="дней"
                       VerticalAlignment="Bottom"
                       Margin="5,0,0,2"
                       FontSize="11"/>
        </WrapPanel>
        <TextBlock Text="Дата следующего заказа"
                   Margin="0,20,0,0"/>
        <TextBox Name="NextOrderDateTextBox"
                 Margin="15,5,0,0"
                 Width="150"
                 HorizontalAlignment="Left">
            <Binding Path="NextExpectedOrderDate">
                        <Binding.Converter>
                            <Converters:DateTimeToDateConverter/>
                        </Binding.Converter>
                    </Binding>
            </TextBox>
    </StackPanel>
</Window>
